	
	<div id="page-content">
			<div class="col-lg-12">
		        <div class="panel">
		            <div class="panel-heading">
		                <h3 class="panel-title" style="text-align: right;">
		                	#@installPJaxGoBackBtn()
		                	#@installFlowHisBtn(defId,procInsId)
		                	#@installAttachment(o?o.id:'')
		                </h3>
		            </div>
					#@buildFormPanelContainer("宾馆预定申请单","/WEB-INF/admin/oa/apply/hotel/editForm.html")
		            #@buildWorkFlowHisTable(procInsId,hislist)
		        </div>
		    </div>
	</div>
	<script>
		function save(){
			var data = common_ajax.ajaxFunc("/admin/oa/apply/hotel/save", $('#editForm').serialize(), "json", null);
			if(data.success){
				pointLion.alertMsg("保存成功!" , "success" , "small" , function(){
					location.href = ctx+'/admin/oa/apply/hotel/getApplyListPage';//跳转到列表页
				},data);
			}else{
				pointLion.alertMsg(data.message , "danger" , "small" , function(){
					$(".btn").removeAttr("disabled");
				},data);
			}
		}
		function resetVali(){
			if(!$("#editForm").data('bootstrapValidator').isValid()) {  
		        $("#editForm").data('bootstrapValidator').resetForm();
		        $(".btn").removeAttr("disabled");
		    }
		}
		$(document).ready(function() {
			$('.form_datetime').datepicker({format: 'yyyy-mm-dd',weekStart: 1,todayBtn:  1,autoclose: 1,language:  'zh-CN',todayHighlight: 1,forceParse: 0,showMeridian: 1}).on('changeDate',function(){
				var startTime = $("#startTime").val();
				var endTime = $("#endTime").val();
				if(startTime&&endTime){
					if(!dateUtil.compareCalendar(startTime,endTime)){
						pointLion.alertMsg("开始时间大于结束时间","danger",null,null);
						$("#editForm .btn").attr("disabled","disabled");
					}else{
						resetVali();
					}
				}
			});
			$('#editForm').bootstrapValidator({
	            fields: {
	            }
	        }).on("success.form.bv", function (e) {
	            save();
	            return false;//阻止表单跳转
	        });
		});
	</script>